kAGErrMacroResourceNotFound = -2934; { -------------------- API reply codes }
kAGErrAppleGuideNotAvailable = -2951;
kAGErrCannotInitCoach = -2952;
kAGErrCannotInitContext = -2953;
kAGErrCannotOpenAliasFile = -2954;
kAGErrNoAliasResource = -2955;
kAGErrDatabaseNotAvailable = -2956;
kAGErrDatabaseNotOpen = -2957;
kAGErrMissingAppInfoHdl = -2958;
kAGErrMissingContextObject = -2959;
kAGErrInvalidRefNum = -2960;
kAGErrDatabaseOpen = -2961;
kAGErrInsufficientMemory = -2962;
{ Events }
{ Not an enum because we want to make assignments. }
TYPE
AGEvent = UInt32;
{ Handy events for AGGeneral. }
CONST
{ Panel actions (Require a presentation window). }
kAGEventDoCoach = 'doco';
kAGEventDoHuh = 'dhuh';
kAGEventGoNext = 'gonp';
kAGEventGoPrev = 'gopp';
kAGEventHidePanel = 'pahi';
kAGEventReturnBack = 'gobk';
kAGEventShowPanel = 'pash';
kAGEventTogglePanel = 'patg';
{ Functions }
{
AGClose
Close the database associated with the AGRefNum.
}
FUNCTION AGClose(VAR refNum: AGRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7011, $AA6E;
{$ENDC}
{
AGGeneral
Cause various events to happen.
}
FUNCTION AGGeneral(refNum: AGRefNum; theEvent: AGEvent): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $700D, $AA6E;
{$ENDC}
{
AGGetAvailableDBTypes
Return the database types available for this application.
}
FUNCTION AGGetAvailableDBTypes: UInt32;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7008, $AA6E;
{$ENDC}
{
AGGetFrontWindowKind
Return the kind of the front window.
}
FUNCTION AGGetFrontWindowKind(refNum: AGRefNum): AGWindowKind;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $700C, $AA6E;
{$ENDC}
{
AGGetFSSpec
Return the FSSpec for the AGRefNum.
}
FUNCTION AGGetFSSpec(refNum: AGRefNum; VAR fileSpec: FSSpec): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $700F, $AA6E;
{$ENDC}
{
AGGetStatus
Return the status of Apple Guide.
}
FUNCTION AGGetStatus: AGStatus;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7009, $AA6E;
{$ENDC}
{
AGInstallCoachHandler
Install a Coach object location query handler.
}
FUNCTION AGInstallCoachHandler(coachReplyProc: CoachReplyUPP; refCon: LONGINT; VAR resultRefNum: AGCoachRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7012, $AA6E;
{$ENDC}
{
AGInstallContextHandler
Install a context check query handler.
}
FUNCTION AGInstallContextHandler(contextReplyProc: ContextReplyUPP; eventID: AEEventID; refCon: LONGINT; VAR resultRefNum: AGContextRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7013, $AA6E;
{$ENDC}
{
AGIsDatabaseOpen
Return true if the database associated with the AGRefNum is open.
}
FUNCTION AGIsDatabaseOpen(refNum: AGRefNum): BOOLEAN;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7006, $AA6E;
{$ENDC}
{
AGOpen
Open a guide database.
}
FUNCTION AGOpen(fileSpec: ConstFSSpecPtr; flags: UInt32; mixinControl: Handle; VAR resultRefNum: AGRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7001, $AA6E;
{$ENDC}
{
AGOpenWithSearch
Open a guide database and preset a search string.
}
FUNCTION AGOpenWithSearch(fileSpec: ConstFSSpecPtr; flags: UInt32; mixinControl: Handle; searchString: Str255; VAR resultRefNum: AGRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7002, $AA6E;
{$ENDC}
{
AGOpenWithSequence
Open a guide database and display a presentation window sequence.
}
FUNCTION AGOpenWithSequence(fileSpec: ConstFSSpecPtr; flags: UInt32; mixinControl: Handle; sequenceID: INTEGER; VAR resultRefNum: AGRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7004, $AA6E;
{$ENDC}
{
AGOpenWithView
Open a guide database and override the default view.
}
FUNCTION AGOpenWithView(fileSpec: ConstFSSpecPtr; flags: UInt32; mixinControl: Handle; viewNum: INTEGER; VAR resultRefNum: AGRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7005, $AA6E;
{$ENDC}
{
AGQuit
Make Apple Guide quit.
}
FUNCTION AGQuit: AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7010, $AA6E;
{$ENDC}
{
AGRemoveCoachHandler
Remove the Coach object location query handler.
}
FUNCTION AGRemoveCoachHandler(VAR resultRefNum: AGCoachRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7014, $AA6E;
{$ENDC}
{
AGRemoveContextHandler
Remove the context check query handler.
}
FUNCTION AGRemoveContextHandler(VAR resultRefNum: AGContextRefNum): AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $7015, $AA6E;
{$ENDC}
{
AGStart
Start up Apple Guide in the background.
}
FUNCTION AGStart: AGErr;
{$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
INLINE $700A, $AA6E;
{$ENDC}
{ typedef's }
TYPE
AGFileFSSpecType = FSSpec;
AGFileFSSpecTypePtr = ^AGFileFSSpecType;
AGFileSelectorCountType = INTEGER;
AGFileSelectorIndexType = INTEGER;
AGFileSelectorType = OSType;
AGFileSelectorValueType = LONGINT;
AGFileDBType = INTEGER;
AGFileDBMenuNamePtr = Str63;
AGFileDBScriptType = INTEGER;
AGFileDBRegionType = INTEGER;
AGFileMajorRevType = INTEGER;
AGFileMinorRevType = INTEGER;
AGFileCountType = INTEGER;
{ Database types (for AGFileDBType parameter). }
CONST
kAGFileDBTypeAny = 0;
kAGFileDBTypeHelp = 1;
kAGFileDBTypeTutorial = 2;
kAGFileDBTypeShortcuts = 3;
kAGFileDBTypeAbout = 4;
kAGFileDBTypeOther = 8;
FUNCTION AGFileGetDBMenuName({CONST}VAR fileSpec: FSSpec; VAR menuItemNameString: Str63): OSErr;
{ Get the database type. }
FUNCTION AGFileGetDBType({CONST}VAR fileSpec: FSSpec; VAR databaseType: AGFileDBType): OSErr;
{
Get the version of the software
that created this database.
}
FUNCTION AGFileGetDBVersion({CONST}VAR fileSpec: FSSpec; VAR majorRev: AGFileMajorRevType; VAR minorRev: AGFileMinorRevType): OSErr;
{ Get the database script and region information. }
FUNCTION AGFileGetDBCountry({CONST}VAR fileSpec: FSSpec; VAR script: AGFileDBScriptType; VAR region: AGFileDBRegionType): OSErr;
{ Return the number of selectors in database. }
FUNCTION AGFileGetSelectorCount({CONST}VAR fileSpec: FSSpec): AGFileSelectorCountType;
{
Get the i-th database selector (1 to AGFileSelectorCountType)
and its value.
}
FUNCTION AGFileGetSelector({CONST}VAR fileSpec: FSSpec; selectorNumber: AGFileSelectorIndexType; VAR selector: AGFileSelectorType; VAR value: AGFileSelectorValueType): OSErr;
{ Return true if database is mixin. }
FUNCTION AGFileIsMixin({CONST}VAR fileSpec: FSSpec): BOOLEAN;
{
Return the number of database files
of the specified databaseType and main/mixin.
Any file creator is acceptible,
but type must be kAGFileMain or kAGFileMixin.
}
FUNCTION AGFileGetDBCount(vRefNum: INTEGER; dirID: LONGINT; databaseType: AGFileDBType; wantMixin: BOOLEAN): AGFileCountType;
{
Get the FSSpec for the dbIndex-th database
of the specified databaseType and main/mixin.
Any file creator is acceptible,
but type must be kAGFileMain or kAGFileMixin.
}
FUNCTION AGFileGetIndDB(vRefNum: INTEGER; dirID: LONGINT; databaseType: AGFileDBType; wantMixin: BOOLEAN; dbIndex: INTEGER; VAR fileSpec: FSSpec): OSErr;
{
This selector must match with the application
creator in order for this file to appear in the
application's Help menu. Ignored for mixin files
because they never appear in the Help menu anyway.
If empty (zeros), will appear in the Help menu
of any host application.
}
FUNCTION AGFileGetHelpMenuAppCreator({CONST}VAR fileSpec: FSSpec; VAR helpMenuAppCreator: OSType): OSErr;
{
This selector must match in the main and mixin
files in order for the mixin to mix-in with the main.
Empty (zeros) selectors are valid matches.
A '****' selector will mix-in with any main.
}
FUNCTION AGFileGetMixinMatchSelector({CONST}VAR fileSpec: FSSpec; VAR mixinMatchSelector: OSType): OSErr;
{
This is the text of the balloon for the
Help menu item for this database.
}
FUNCTION AGFileGetHelpMenuBalloonText({CONST}VAR fileSpec: FSSpec; VAR helpMenuBalloonString: Str255): OSErr;
FUNCTION AGGetSystemDB(databaseType: AGFileDBType; wantMixin: BOOLEAN; VAR pFileSpec: FSSpec): OSErr;